evapoRe |Demo

Akbar Rahmati Ziveh, Mijael Rodrigo Vargas Godoy, Vishal Thakur, Yannis Markonis

2023-06-12


The evapoRe package developed as part of the ITHACA project at the Faculty of Environmental Sciences, Czech University of Life Sciences Prague, Czechia. Its primary purpose is to facilitate the download, exploration, visualization, and analysis of evapotranspiration (ET) data. Additionally, evapoRe offers the functionality to calculate various potential evapotranspiration (PET) methods.


Before We Start

Like many other R packages, evapoRe has some system requirements:

Data

evapoRe database hosts 10 different ET data sets; one satellite-based, four reanalysis, and five hydrological model products. Their native specifications, as well as links to their providers, and their respective references are detailed in the following subsections. We have already homogenized, compacted to a single file, and stored them in a Zenodo repository under the following naming convention:

<data set>_<variable>_<units>_<coverage>_<start date>_<end date>_<resolution>_<time step>.nc

The evapoRe data collection was homogenized to these specifications: * <variable> = Actual evapotranspiration (e) * <units> = millimeters (mm) * <resolution> = 0.25° * <time step> = monthly

E.g., ERA5 (Hersbach et al. 2020) would be:

era5_e_mm_global_195901_202112_025_monthly.nc

Satellite-Based Products

Spatial Coverage
Data Set Spatial Resolution Global Land Ocean Temporal Resolution Record Length Get Data Reference
GLEAM V3.0 0.25° x Monthly 1980/01-2021/12 Download Martens et al. (2017)

Reanalysis Products

Spatial Coverage
Data Set Spatial Resolution Global Land Ocean Temporal Resolution Record Length Get Data Reference
ERA5-Land 0.1° x Monthly 1960/01-2022/12 Download Muñoz-Sabater et al. (2021)
ERA5 0.25° x x x Monthly 1959/01-2021/12 Download Hersbach et al. (2020)
JRA-55 1.25° x Monthly 1958/01-2021/12 Download Kobayashi et al. (2015)
MERRA-2 0.5° x 0.625° x Monthly 1980/01-2023/01 Download Gelaro et al. (2017)

Hydrological Model Outputs

Spatial Coverage
Data Set Spatial Resolution Global Land Ocean Temporal Resolution Record Length Get Data Reference
FLDAS 0.1° x Monthly 1982/01-2022/12 Download McNally et al. (2017)
GLDAS CLSM V2.1 x Monthly 2000/01-2022/11 Download Rodell et al. (2004)
GLDAS NOAH V2.1 0.25° x Monthly 2000/01-2022/11 Download Rodell et al. (2004) and Beaudoing and Rodell (2020)
GLDAS VIC V2.1 x Monthly 2000/01-2022/11 Download Rodell et al. (2004)
TerraClimate 4\(km\) x Monthly 1958/01-2021/12 Download Abatzoglou et al. (2018)

Recipe

In this introductory recipe we will first download the FLDAS data set. We will then subset the downloaded data over Central Europe for the 2001-2010 period, and crop it to the national scale for Czechia. In the next step, we will generate time series for our data sets and conclude with the visualization of our data.

NOTE: While the functions in evapoRe are intended to work directly with its data inventory. It can handle most other ET data sets in “.nc” format, as well as any other “.nc” file generated by its functions.

Installation

devtools::install_github("AkbarR1184/evapoRe")
library(evapoRe)

Download

Downloading the entire data collection or only a few data sets is quite straightforward. You just call the download_data function, which has four arguments name, destination, domain, and time_res.

Let’s download the fldas data set and inspect its content with show_info:

download_data(name = 'fldas')
fldas_global <- raster::brick('fldas_e_mm_land_198201_202212_025_monthly.nc')
show_info(fldas_global)
[1] "class      : RasterBrick "                                         
[2] "dimensions : 720, 1440, 1036800, 492  (nrow, ncol, ncell, nlayers)"
[3] "resolution : 0.25, 0.25  (x, y)"
[4] "extent     : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)"
[5] "crs        : +proj=longlat +datum=WGS84 "
[6] "source     : fldas_e_mm_land_198201_202212_025_monthly.nc "
[7] "names      : X1982.01.01, X1982.02.01, X1982.03.01, X1982.04.01, X1982.05.01, X1982.06.01, X1982.07.01, X1982.08.01, X1982.09.01, X1982.10.01, X1982.11.01, X1982.12.01, X1983.01.01, X1983.02.01, X1983.03.01, ... "
[8] "Date/time  : 1982-01-01, 2022-12-01 (min, max)"
[9] "varname    : e " 

Processing

Once we have downloaded our database, we can start processing the data with:

Subset

To subset our data to a desired region and period of interest, we use the subset_spacetime function, which has four arguments data, years, bbox, and autosave.

  • data is the path to the data set of interest or a RasterBrick object.
  • years is the period of interest in the form (start_year, end_year)
  • bbox is the bounding box of the region of interest with the coordinates in degrees in the form (xmin, xmax, ymin, ymax).
  • autosave is set to FALSE by default. If TRUE data will be automatically stored in the same location of the input file.

Let’s subset the fldas data set over Central Europe (2,28,42,58) for the 1981-2020 period, and inspect its content with show_info:

fldas_subset <- subset_spacetime(fldas_global, years = c(2001, 2010), bbox = c(2,28,42,58))
show_info(fldas_subset)
[1] "class      : RasterBrick "
[2] "dimensions : 64, 104, 6656, 120  (nrow, ncol, ncell, nlayers)"
[3] "resolution : 0.25, 0.25  (x, y)"
[4] "extent     : 2, 28, 42, 58  (xmin, xmax, ymin, ymax)"
[5] "crs        : +proj=longlat +datum=WGS84 "
[6] "source     : memory"
[7] "names      :  X2001.01.01,  X2001.02.01,  X2001.03.01,  X2001.04.01,  X2001.05.01,  X2001.06.01,  X2001.07.01,  X2001.08.01,  X2001.09.01,  X2001.10.01,  X2001.11.01,  X2001.12.01,  X2002.01.01,  X2002.02.01,  X2002.03.01, ... "
[8] "min values : -3.7794194221, -0.4208407104, -0.5045991540, -0.0572454371, -0.0005709816,  0.0000000000,  0.0000000000,  0.0000000000, -0.3487000465, -1.6532191038, -0.4017279446, -2.5777058601, -2.6171388626, -0.3143836856, -0.2774783075, ... "
[9] "max values :      56.90099,      69.52248,     113.14240,     125.60358,     174.75136,     190.40407,     189.30975,     155.39180,      99.69257,      76.16212,      62.63054,      47.89834,      40.91222,      68.70403,      99.67541, ... "
[10] "time       : 2001-01-01, 2010-12-01 (min, max)"

Crop

To further crop our data to a desired polygon other than a rectangle, we use the crop_data function, which has three arguments x, shp_path, autosave.

  • x is the path to a “.nc” data set file or a RasterBrick object.
  • shp_path is the path to a “.shp” file that we want to use to crop our data.
  • autosave is set to FALSE by default. If TRUE data will be automatically stored in the same location of the input file.

Let’s crop our fldas subset to cover only Czechia with the respective shape file, and inspect its content with show_info:

fldas_cz <- crop_data(fldas_subset, shp_path = "gadm41_CZE_0.shp")
show_info(fldas_cz)
[1] "class      : RasterBrick "
[2] "dimensions : 64, 104, 6656, 120  (nrow, ncol, ncell, nlayers)"
[3] "resolution : 0.25, 0.25  (x, y)"
[4] "extent     : 2, 28, 42, 58  (xmin, xmax, ymin, ymax)"
[5] "crs        : +proj=longlat +datum=WGS84 "
[6] "source     : memory"
[7] "names      : X2001.01.01, X2001.02.01, X2001.03.01, X2001.04.01, X2001.05.01, X2001.06.01, X2001.07.01, X2001.08.01, X2001.09.01, X2001.10.01, X2001.11.01, X2001.12.01, X2002.01.01, X2002.02.01, X2002.03.01, ... "
[8] "min values :   2.8995819,   0.3797975,   3.0552430,   2.6468999,   2.3843012,   8.8729420,  10.6661291,   6.5048337,   3.1765358,   1.2650596,   2.0705938,   4.3670325,   8.1393061,   2.2920027,   1.8019267, ... "
[9] "max values :    19.11826,    33.55016,    46.44899,    67.51703,   154.64659,   127.61076,   148.00507,   130.79279,    60.39583,    39.82825,    25.54001,    22.27194,    30.96886,    35.84626,    53.87944, ... "
[10] "time       : 2001-01-01, 2010-12-01 (min, max)"

PET calculation

First we need to download temperature data. To to this we will use terraclimate temperature data from the Zenodo repository:

variable is the variable name in which t stands for tavg, tmin, and tmax.

download_terraclimate(variable = "t", folder_path = ".")

This will returns terraclimate temperature data in following name convention e.g.,

terraclimate_tavg_land_19580101_20221231_025_monthly.nc

pet_calc function is calculating PET from various method. “hs” for Hargreaves Samani method (Hargreaves and Samani 1982), “od” for Oudin method (Oudin et al. 2005), “mb” for McGuinness and Bordne method (McGuinness and Bordne 1972), “jh” for Jensen Haise method (Jensen and Haise 1963), and “br” for Baier and Robertson (Baier and Robertson 1965).

Calculate PET by oudin method

tavg_brick <- raster::brick("terraclimate_tavg_land_19580101_20221231_025_monthly.nc")
pet_oudin_global <- pet_calc(method = "od", tavg = tavg_brick)
show_info(pet_oudin_global)
[1] "class      : RasterBrick "
[2] "dimensions : 720, 1440, 1036800, 780  (nrow, ncol, ncell, nlayers)" 
[3] "resolution : 0.25, 0.25  (x, y)"
[4] "extent     : 2, 28, 42, 58  (xmin, xmax, ymin, ymax)"
[5] "crs        : +proj=longlat +datum=WGS84 +no_defs "
[6] "source     : memory"
[7] "names      : X1958.01.01, X1958.02.01, X1958.03.01, X1958.04.01, X1958.05.01, X1958.06.01, X1958.07.01, X1958.08.01, X1958.09.01, X1958.10.01, X1958.11.01, X1958.12.01, X1959.01.01, X1959.02.01, X1959.03.01, ... "
[8] "min values :           0,           0,           0,           0,           0,           0,           0,           0,           0,           0,           0,           0,           0,           0,           0, ... "
[9] "max values :    211.0769,    183.8832,    180.3431,    181.3188,    208.0041,    219.7289,    233.0501,    226.3481,    191.6451,    182.9314,    191.2556,    208.2998,    216.5920,    182.6839,    189.2202, ... "
[10] "Date/time  : 1958-01-01, 2022-12-01 (min, max)"

Generate Time series

Time series for global ET products

To make a time series out of our data, we use the make_ts function, which has two arguments data, and autosave.

  • data is the path to a “.nc” data set file or a RasterBrick object.
  • name is the dataset name.
  • autosave is set to FALSE by default. If TRUE data will be automatically stored in the same location of the input file.

Let’s generate the time series for our three different fldas data sets (Global, Central Europe, and Czechia), and inspect its first 12 rows:

fldas_global_ts <- make_ts(fldas_global, name="fldas")
head(fldas_global_ts, 12)
 date    value  name          type
 1: 1982-01-01 40.01818 FLDAS Model forcing
 2: 1982-02-01 39.05691 FLDAS Model forcing
 3: 1982-03-01 45.63258 FLDAS Model forcing
 4: 1982-04-01 48.38817 FLDAS Model forcing
 5: 1982-05-01 56.04541 FLDAS Model forcing
 6: 1982-06-01 59.48527 FLDAS Model forcing
 7: 1982-07-01 63.42378 FLDAS Model forcing
 8: 1982-08-01 58.08678 FLDAS Model forcing
 9: 1982-09-01 47.53051 FLDAS Model forcing
10: 1982-10-01 43.30959 FLDAS Model forcing
11: 1982-11-01 39.14826 FLDAS Model forcing
12: 1982-12-01 39.41859 FLDAS Model forcing
fldas_subset_ts <- make_ts(fldas_subset, name="fldas")
head(fldas_subset_ts, 12)
          date     value  name          type
 1: 2001-01-01  14.47523 FLDAS Model forcing
 2: 2001-02-01  24.55700 FLDAS Model forcing
 3: 2001-03-01  43.77176 FLDAS Model forcing
 4: 2001-04-01  61.23033 FLDAS Model forcing
 5: 2001-05-01 112.55881 FLDAS Model forcing
 6: 2001-06-01 114.57058 FLDAS Model forcing
 7: 2001-07-01 116.47619 FLDAS Model forcing
 8: 2001-08-01  79.83941 FLDAS Model forcing
 9: 2001-09-01  50.78079 FLDAS Model forcing
10: 2001-10-01  32.62168 FLDAS Model forcing
11: 2001-11-01  20.41700 FLDAS Model forcing
12: 2001-12-01  13.59456 FLDAS Model forcing
fldas_cz_ts <- make_ts(fldas_cz, name = "fldas")
head(fldas_cz_ts, 12)
          date     value  name          type
 1: 2001-01-01  12.23963 FLDAS Model forcing
 2: 2001-02-01  23.80942 FLDAS Model forcing
 3: 2001-03-01  36.08155 FLDAS Model forcing
 4: 2001-04-01  50.36031 FLDAS Model forcing
 5: 2001-05-01 105.76477 FLDAS Model forcing
 6: 2001-06-01  95.73339 FLDAS Model forcing
 7: 2001-07-01  99.95880 FLDAS Model forcing
 8: 2001-08-01  80.05314 FLDAS Model forcing
 9: 2001-09-01  42.28572 FLDAS Model forcing
10: 2001-10-01  24.04546 FLDAS Model forcing
11: 2001-11-01  15.01222 FLDAS Model forcing
12: 2001-12-01  12.39291 FLDAS Model forcing

Time series for calculated PET

Let’s generate the time series for our three different PET calculated by oudin method (Global, Central Europe, and Czechia), and inspect its first 12 rows:

pet_oudin_global_ts <- make_ts(pet_oudin)
head(pet_oudin_global_ts, 12)
         date     value
 1: 1958-01-01  61.30534
 2: 1958-02-01  57.55157
 3: 1958-03-01  69.26975
 4: 1958-04-01  75.33172
 5: 1958-05-01  88.64012
 6: 1958-06-01  97.28295
 7: 1958-07-01 107.45549
 8: 1958-08-01 102.36428
 9: 1958-09-01  86.36096
10: 1958-10-01  76.35980
11: 1958-11-01  64.49735
12: 1958-12-01  61.64263
pet_oudin_subset_ts <- make_ts(fldas_subset)
head(pet_oudin_subset_ts, 12)
       date      value
 1: 2001-01-01   6.537995
 2: 2001-02-01   9.020948
 3: 2001-03-01  23.816143
 4: 2001-04-01  43.600781
 5: 2001-05-01  86.532623
 6: 2001-06-01 101.766002
 7: 2001-07-01 130.146518
 8: 2001-08-01 117.460246
 9: 2001-09-01  66.214705
10: 2001-10-01  46.758231
11: 2001-11-01  13.947147
12: 2001-12-01   3.455045
pet_oudin_cz_ts<-make_ts(pet_oudin_cz)
head(pet_oudin_cz_ts, 12)
         date      value
 1: 2001-01-01   3.473700
 2: 2001-02-01   6.930045
 3: 2001-03-01  19.420555
 4: 2001-04-01  38.746838
 5: 2001-05-01  85.328999
 6: 2001-06-01  94.114641
 7: 2001-07-01 120.078897
 8: 2001-08-01 111.231710
 9: 2001-09-01  58.833599
10: 2001-10-01  43.545129
11: 2001-11-01  10.677348
12: 2001-12-01   1.429517

Visualize

Either after we have processed our data as required or right after downloaded, we have six different options to visualize our data for more information refer to visualisation section of pRecipe:

Maps

To see a map of any data set raw or processed, we use plot_map which takes only one layer of the RasterBrick as input.

plot_map(fldas_global[[1]])
plot_map(pet_oudin_global[[1]])

plot_map(fldas_subset[[1]])
plot_map(pet_oudin_subset[[1]])

plot_map(fldas_cz[[1]])
plot_map(pet_oudin_cz[[1]])

Time Series Visuals

To draw a time series generated by make_ts, we use any of the options below, which takes only a make_ts “.csv” generated file.

Lineplots

plot_line(fldas_global_ts, var = "Evapotranspiration")
plot_line(fldas_subset_ts, var = "Evapotranspiration")
plot_line(fldas_cz_ts, var = "Evapotranspiration")
plot_line(pet_oudin_global_ts, var = "Evapotranspiration")
plot_line(pet_oudin_subset_ts, var = "Evapotranspiration")
plot_line(pet_oudin_cz_ts, var = "Evapotranspiration")

Heatmap

plot_heatmap(fldas_global_ts)

plot_heatmap(fldas_subset_ts)

plot_heatmap(fldas_cz_ts)

plot_heatmap(pet_oudin_global_ts)

plot_heatmap(pet_oudin_subset_ts)

plot_heatmap(pet_oudin_cz_ts)

Boxplot

plot_box(fldas_global_ts, var = "Evapotranspiration")

plot_box(fldas_subset_ts, var = "Evapotranspiration")

plot_box(fldas_cz_ts, var = "Evapotranspiration" )

plot_box(pet_oudin_global_ts, var = "Evapotranspiration")

plot_box(pet_oudin_subset_ts, var = "Evapotranspiration")

plot_box(pet_oudin_cz_ts, var = "Evapotranspiration" )

Density plots

plot_density(fldas_global_ts, var = "Evapotranspiration")

plot_density(fldas_subset_ts, var = "Evapotranspiration")

plot_density(fldas_cz_ts, var = "Evapotranspiration")

plot_density(pet_oudin_global_ts, var = "Evapotranspiration")

plot_density(pet_oudin_subset_ts, var = "Evapotranspiration")

plot_density(pet_oudin_cz_ts, var = "Evapotranspiration")

Summary

NOTE: For good aesthetics we recommend saving plot_summary with ggsave(<filename>, <plot>, width = 16.3, height = 15.03).

plot_summary(fldas_global_ts)
#plot_summary(fldas_subset_ts)
#plot_summary(fldas_cz_ts)
plot_summary(pet_oudin_global_ts)
#plot_summary(pet_oudin_subset_ts)
#plot_summary(pet_oudin_cz_ts)

Coming Soon

We will introduce significant enhancements to ET database and PET calculation methods. This expansion builds upon our existing temperature-based approach and incorporates a radiation-based PET calculation methods, along with an expanded range of temperature-based methods. Our aim is to provide users with a more comprehensive and accurate estimation of ET and PET, catering to a broader range of applications and requirements.

References

Abatzoglou, John T, Solomon Z Dobrowski, Sean A Parks, and Katherine C Hegewisch. 2018. “TerraClimate, a High-Resolution Global Dataset of Monthly Climate and Climatic Water Balance from 1958–2015.” Scientific Data 5 (1): 1–12.
Baier, W., and G. W. Robertson. 1965. “Estimation of Latent Evaporation from Simple Weather Observations.” Canadian Journal of Plant Science 45 (3): 276–84.
Beaudoing, Hiroko, and Matthew Rodell. 2020. GLDAS Noah Land Surface Model L4 monthly 0.25 x 0.25 degree V2.1.” Greenbelt, Maryland, USA: Goddard Earth Sciences Data and Information Services Center (GES DISC). https://doi.org/10.5067/SXAVCZFAQLNO.
Gelaro, Ronald, Will McCarty, Max J. Suárez, Ricardo Todling, Andrea Molod, Lawrence Takacs, Cynthia A. Randles, et al. 2017. “The Modern-Era Retrospective Analysis for Research and Applications, Version 2 (MERRA-2).” Journal of Climate 30 (14): 5419–54. https://doi.org/10.1175/JCLI-D-16-0758.1.
Hargreaves, G. H., and Z. A. Samani. 1982. “Estimating Potential Evapotranspiration.” Journal of the Irrigation and Drainage Division 108 (3): 225–30.
Hersbach, Hans, Bill Bell, Paul Berrisford, Shoji Hirahara, András Horányi, Joaquín Muñoz-Sabater, Julien Nicolas, et al. 2020. “The ERA5 Global Reanalysis.” Quarterly Journal of the Royal Meteorological Society 146 (730): 1999–2049.
Jensen, M. E., and H. R. Haise. 1963. “Estimating Evapotranspiration from Solar Radiation.” Journal of the Irrigation and Drainage Division 89 (4): 15–41.
Kobayashi, Shinya, Yukinari Ota, Yayoi Harada, Ayataka Ebita, Masami Moriya, Hirokatsu Onoda, Kazutoshi Onogi, et al. 2015. “The JRA-55 Reanalysis: General Specifications and Basic Characteristics.” Journal of the Meteorological Society of Japan. Ser. II 93 (1): 5–48. https://doi.org/10.2151/jmsj.2015-001.
Martens, Brecht, Diego G. Miralles, Hans Lievens, Robin van der Schalie, Richard A. M. de Jeu, Diego Fernández-Prieto, Hylke E. Beck, Wouter A. Dorigo, and Niko E. C. Verhoest. 2017. GLEAM v3: satellite-based land evaporation and root-zone soil moisture.” Geoscientific Model Development 10 (5): 1903–25. https://doi.org/10.5194/gmd-10-1903-2017.
McGuinness, J. L., and E. F. Bordne. 1972. “A Comparison of Lysimeter-Derived Potential Evapotranspiration with Computed Values.” 1452. US Department of Agriculture.
McNally, Amy, Kristi Arsenault, Sujay Kumar, Shraddhanand Shukla, Pete Peterson, Shugong Wang, Chris Funk, Christa D. Peters-Lidard, and James P. Verdin. 2017. “A Land Data Assimilation System for Sub-Saharan Africa Food and Water Security Applications.” Scientific Data 4 (1): 170012. https://doi.org/10.1038/sdata.2017.12.
Muñoz-Sabater, Joaquín, Gianpaolo Balsamo, Emanuel Dutra, Hans Hersbach, Patricia López, Diego Miralles, Robin van der Schalie, et al. 2021. ERA5-Land: A state-of-the-art global reanalysis dataset for land applications.” Earth System Science Data 13 (9): 4349–83. https://doi.org/10.5194/essd-13-4349-2021.
Oudin, L., F. Hervieu, C. Michel, C. Perrin, V. Andréassian, F. Anctil, and C. Loumagne. 2005. “Which Potential Evapotranspiration Input for a Lumped Rainfall–Runoff Model?: Part 2–Towards a Simple and Efficient Potential Evapotranspiration Model for Rainfall–Runoff Modelling.” Journal of Hydrology 303 (1-4): 290–306.
Rodell, Matthew, Paul R. Houser, Uli Jambor, Jon Gottschalck, Ken Mitchell, Chuanmin Meng, Kristi Arsenault, et al. 2004. The Global Land Data Assimilation System.” Bulletin of the American Meteorological Society 85: 381–94. https://doi.org/10.1175/BAMS-85-3-381.